package com.idheima.zuoye.zuoye5;

public class Breeder {

    public void breed(Animal a) {
        a.dink();
        a.eat();
        if(a instanceof Dog)
        {
            Dog d = (Dog)a;
           // d.run();
        } else if(a instanceof Frog)
        {
            Frog f = (Frog)a;
           // f.run();
        }
    }
    public void competition(Swim  swim){
        swim.swim();

    }



}
